import { quat, sp } from 'cc';
import { Quat } from 'cc';
import { _decorator, Component, Node } from 'cc';
const { ccclass, property } = _decorator;

const _q0 = quat();

@ccclass('shine_rot')
export class shine_rot extends Component {

    @property
    speedRate = 10;

    update(deltaTime: number) {
        // way1:
        // this.node.getRotation(_q0);
        // Quat.rotateZ(_q0, _q0, deltaTime * 1);
        // this.node.setRotation(_q0);
        // way2:
        Quat.fromAngleZ(_q0, deltaTime * this.speedRate);
        this.node.rotate(_q0);
    }
}

